<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="app">
    <h1 v-html="url"></h1>
    <button @click="myclick" data-id="1">html</button>
    <button @click="myclick" data-id="2">js</button>
    <button @click="myclick" data-id="3">css</button>
</div>
<script>
    let app = new Vue({
        el:'#app',
        data:{
            url: '<a href="http://www.baidu.com">百度一下</a>'
        },
        methods:{
          myclick(e){
            console.log(e.target.dataset.id)
          }
        }
    })
</script>
</body>
</html>
